package br.com.ps.bombertournament.game.action;

import br.com.ps.bombertournament.game.AnimationListener;
import br.com.ps.bombertournament.game.BaseAction;
import br.com.ps.bombertournament.game.BaseGameObject;

/**
 * Call the owner of the animation 
 * 
 * @author Rennan Stefan Boni - rennanboni@gmail.com
 */
public class CallOwnerAction extends BaseAction {

	@Override
	public void create() {
		// Do nothing
	}

	@Override
	public void execute(BaseGameObject owner) {
		super.setExecuted(true);
		
		if (owner instanceof AnimationListener) {
			((AnimationListener) owner).animationUpdated();
		}
	}

	@Override
	public void undo(BaseGameObject owner) {
		// Do nothing
	}
}
